home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / bc_pas_1.zip / DIALOG.H < prev    next >
Text File  |  1992-07-13  |  6KB  |  190 lines

  1. /*$Author:   BCRANE  $*/
  2. /*$Date:   13 Jul 1992 11:56:42  $*/
  3. /*$Header:   W:/sccs/mixers/dialog.h_v   1.3   13 Jul 1992 11:56:42   BCRANE  $*/
  4. /*$Log:   W:/sccs/mixers/dialog.h_v  $
  5.  * 
  6.  *    Rev 1.3   13 Jul 1992 11:56:42   BCRANE
  7.  * added defines for F5-F8 and SF5-SF8
  8.  * 
  9.  *    Rev 1.2   09 Jul 1992 17:45:58   BCRANE
  10.  * added defines for F3 and shifted F3
  11.  * 
  12.  *    Rev 1.1   23 Jun 1992 16:44:58   DCODY
  13.  * PAS2 update
  14.  * 
  15.  *    Rev 1.0   15 Jun 1992 09:41:20   BCRANE
  16.  * Initial revision.
  17. */
  18. /*$Logfile:   W:/sccs/mixers/dialog.h_v  $*/
  19. /*$Modtimes$*/
  20.  
  21.     /*\
  22.     |*|----=====< DIALOG.H >====----
  23.     |*|
  24.     |*|  This module holds the various definitions for the mixer DIALOG module
  25.     |*|
  26.     \*/
  27.  
  28.  
  29.     /*\
  30.     |*| New Data definitions
  31.     \*/
  32.  
  33.     typedef unsigned int UWORD;
  34.     typedef char BYTE;
  35.  
  36. #define TRUE    -1
  37. #define FALSE     0
  38. #define ON    TRUE
  39. #define OFF    FALSE
  40.  
  41.  
  42.     /*\
  43.     |*|----====< Messages to be passed to the action routines >====----
  44.     \*/
  45.  
  46. #define OPEVENT     0x0001        /* operator event        */
  47.  
  48. #define FOCUS_GIVEN     0x0002          /* focus to button              */
  49. #define FOCUS_TAKEN    0x0003        /* focus taken from button    */
  50.  
  51. #define DRAWIT        0x0004        /* draw the OBJECT        */
  52. #define CLEARIT     0x0005        /* clear the OBJECT area    */
  53. #define OPENINIT        0x0006          /* 1st call initialization      */
  54. #define SENDIT        0x0007        /* Send command to h/w        */
  55.  
  56.  
  57.     /*\
  58.     |*|----=====< Keyboard Values >=====----
  59.     \*/
  60.  
  61. #define ESCAPE        0x011B        /* Escape key            */
  62. #define F1KEY        0x3B00        /* F1 key            */
  63. #define F2KEY        0x3C00        /* F2 key            */
  64. #define F3KEY        0x3D00        /* F3 key            */
  65. #define SF3KEY        0x5600        /* shifted F3 key            */
  66. #define F4KEY        0x3E00        /* F4 key            */
  67. #define F5KEY        0x3F00        /* F5 key            */
  68. #define SF5KEY        0x5800        /* shifted F5 key            */
  69. #define F6KEY        0x4000        /* F6 key            */
  70. #define SF6KEY        0x5900        /* shifted F6 key            */
  71. #define F7KEY        0x4100        /* F7 key            */
  72. #define SF7KEY        0x5A00        /* shifted F7 key            */
  73. #define F8KEY        0x4200        /* F8 key            */
  74. #define SF8KEY        0x5B00        /* shifted F8 key            */
  75. #define ENTER        0x1C0D        /* Enter key            */
  76. #define SH_TABKEY    0x0F00        /* shift tab key        */
  77. #define TABKEY          0x0F09          /* tab key                      */
  78. #define PLUSKEY1    0x0d2b        /* +                */
  79. #define PLUSKEY2    0x4e2b        /* +                */
  80. #define MINUSKEY1    0x0c2d        /* -                */
  81. #define MINUSKEY2    0x4a2d        /* -                */
  82. #define LFARROW     0x4b00        /* left arrow key        */
  83. #define RIARROW     0x4d00        /* right arrow key        */
  84. #define UPARROW     0x4800        /* upward arrow key        */
  85. #define DNARROW     0x5000        /* down arrow key        */
  86.  
  87. #define HOMEKEY     0x4700        /* HOME key            */
  88. #define PGUPKEY     0x4900        /* PGUP key            */
  89. #define ENDKEY        0x4F00        /* END    key            */
  90. #define PGDNKEY     0x5100        /* PGDN key            */
  91.  
  92.  
  93.     /*\
  94.     |*|----=====< Data structures >====----
  95.     \*/
  96.  
  97.     typedef struct {
  98.         int row;
  99.         int col;
  100.     } point;
  101.  
  102.         typedef struct {
  103.          int row1;
  104.          int col1;
  105.          int row2;
  106.          int col2;
  107.     } rect;
  108.  
  109.     typedef struct {
  110.         rect wndr;
  111.         int row;
  112.         int col;
  113.         char attr;
  114.         char wrap;
  115.         unsigned int soff;
  116.         unsigned int sseg;
  117.     } VideoStruct;
  118.  
  119.  
  120.     /*\
  121.     |*|----=====< Event Structure >====----
  122.     \*/
  123.  
  124.     /* redefine the metawindow event structure with UWORD        */
  125.  
  126.     typedef struct _revent {// Event record structure
  127.         int type;        // type of event 0=none,1=mouse,2=keybrd
  128.         int flags;        // bit flags from interrupt
  129.         int buttons;    // button state
  130.         int vpos;        // vertical position
  131.         int hpos;        // horzontal position
  132.         long time;        // clock tic count
  133.  
  134.     } Event, *EPtr;
  135.      
  136.     /* we define our own event control block to add a 'type' of event */
  137.  
  138. #define EV_MOUS         01        /* mouse event            */
  139. #define EV_KEYB         02        /* keyboard event        */
  140.  
  141. #define EV_RITSHIFT    0x0001        /* right shift depressed    */
  142. #define EV_LEFTSHIFT    0x0002        /* left shift depressed     */
  143. #define EV_CONTROL    0x0004        /* control key depressed    */
  144. #define EV_ALT        0x0008        /* alt key depressed        */
  145. #define EV_SCROLLOCK    0x0010        /* scroll lock active        */
  146. #define EV_NUMLOCK    0x0020        /* num lock active        */
  147. #define EV_CAPSLOCK    0x0040        /* caps lock active        */
  148. #define EV_INSERT    0x0080        /* insert active        */
  149.  
  150. #define EV_LEFTBUTTON    0x0001        /* mouse left button depressed    */
  151. #define EV_MIDBUTTON    0x0002        /* mouse middle button depressed*/
  152. #define EV_RITBUTTON    0x0004        /* mouse right button depressed */
  153.  
  154. #define EV_BUTTONS    (EV_RITBUTTON|EV_MIDBUTTON|EV_LEFTBUTTON)
  155.  
  156. #define MA_LBCHANGE    0x0100        /* left button has changed    */
  157. #define MA_MBCHANGE    0x0200        /* middle button has changed    */
  158. #define MA_RBCHANGE    0x0400        /* right button has changed    */
  159. #define MA_DOUBLE    0x8000        /* double click timing        */
  160.  
  161. #define MA_BUTTONCHG   (MA_RBCHANGE|MA_MBCHANGE|MA_LBCHANGE)
  162.  
  163.     /* logical abstraction of event occurances returned by "TheMouseEvent */
  164.  
  165. #define LEFTBUTTONDOWN        0x0001    /* Left button down        */
  166. #define RIGHTBUTTONDOWN     0x0002    /* right button down        */
  167. #define MIDBUTTONDOWN        0x0004    /* middle button down        */
  168.  
  169. #define LEFTBUTTONHELDDOWN    0x0008    /* Left button down        */
  170. #define RIGHTBUTTONHELDDOWN    0x0010    /* right button down        */
  171. #define MIDBUTTONHELDDOWN    0x0020    /* middle button down        */
  172.  
  173. #define LEFTBUTTONUP        0x0040    /* Left button up        */
  174. #define RIGHTBUTTONUP        0x0080    /* right button up        */
  175. #define MIDBUTTONUP        0x0100    /* middle button up        */
  176.  
  177. #define LEFTBUTTONDOUBLEDOWN    0x0200    /* Left button double click    */
  178. #define RIGHTBUTTONDOUBLEDOWN    0x0400    /* right button double click    */
  179. #define MIDBUTTONDOUBLEDOWN    0x0800    /* middle button double click    */
  180.  
  181.     /* amount of time between mouse key down events to make a double click */
  182.  
  183. #define DOUBLECLICK    4        /* 4 clock ticks        */
  184.  
  185.  
  186.     /*\
  187.     |*| end of DIALOG.H
  188.     \*/
  189.  
  190.